const memesorting = meme => {
    var a = (meme.match(/^.*?b.*?u.*?g/i) || [''])[0].length;
    var b = (meme.match(/^.*?b.*?o.*?o.*?m/i) || [''])[0].length;
    var c = (meme.match(/^.*?e.*?d.*?i.*?t.*?s/i) || [''])[0].length;
    a = a ? a : Infinity; b = b ? b : Infinity; c = c ? c : Infinity;
    if (a === b && b === c && c === Infinity) return 'Vlad';
    var m = Math.min(...[a, b, c]);
    var res = ['Roma', 'Maxim', 'Danik'];
    return res[[a, b, c].indexOf(m)]
}
console.log(memesorting('This could be chemistry meme but our gey word boom is too late'))